from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from PyCmpltrtok.common import sep

text_generation_zh = pipeline(Tasks.text_generation, model='damo/nlp_gpt3_text-generation_chinese-base')
result_zh = text_generation_zh("怎样高薪就业？")
print(result_zh['text'])


# def infer(xinput):
#     xoutput_dict = text_generation_zh(xinput)
#     return xoutput_dict
#
#
# while True:
#     sep()
#     print('请讲：')
#     xinput = input()
#     print('推理中……')
#     xoutput_dict = infer(xinput)
#     sep()
#     print(xoutput_dict)
